package com.exartisan.network;

import org.json.JSONException;
import org.json.JSONObject;

import com.loopj.android.http.RequestParams;

public class WeirdParametersBuilder {

	public WeirdParametersBuilder() {
		
	}
	
	public static RequestParams BuildParams(String data){
		RequestParams params = new RequestParams();
		params.put(NetworkUtility.DATA, data);
		return params;
	}
	
	public static String BuildTopEventData(){
		JSONObject data = new JSONObject();
		try {
			data.put(NetworkUtility.HANDLE, NetworkUtility.TOP_EVENT);
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return data.toString();
	}
	
	public static String BuildNewEventData(){
		JSONObject data = new JSONObject();
		try {
			data.put(NetworkUtility.HANDLE, NetworkUtility.NEW_EVENT);
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return data.toString();
	}
	
	public static String BuildGalleryInfoData(){
		JSONObject data = new JSONObject();
		try {
			data.put(NetworkUtility.HANDLE, NetworkUtility.GALLERY_INFO);
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return data.toString();
	}
	
	public static String BuildEventGalleryData(String event_id){
		JSONObject data = new JSONObject();
		try {
			data.put(NetworkUtility.HANDLE, NetworkUtility.EVENT_GALLERY);
			data.put(NetworkUtility.REQUEST_EVENT_ID, event_id);
		} catch (JSONException e) {
			e.printStackTrace();
		}
		
		return data.toString();
	}
	
	public static String BuildDetailEventData(String id){
		JSONObject data = new JSONObject();
		try {
			data.put(NetworkUtility.HANDLE, NetworkUtility.DETAIL_EVENT);
			data.put(NetworkUtility.REQUEST_ID, id);
		} catch (JSONException e) {
			e.printStackTrace();
		}
		
		return data.toString();
	}
	
	
	
}
	
	